<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <meta name="HandheldFriendly" content="true">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <link rel="Shortcut Icon" href="/favicon.ico">
    <title>文思学堂送我现金券~助力孩子成长</title>
    <link rel="stylesheet" href="https://m.wozamai.com/huodong/ceshenjia/css/reset.css">
    <link rel="stylesheet" href="https://m.wozamai.com/huodong/ceshenjia/css/base.css">
    <script src="https://m.wozamai.com/h5/js/top.js"></script>
    <script src="https://m.wozamai.com/static/js/common.js"></script>
    <script type="text/javascript" src="https://m.wozamai.com/huodong/ceshenjia/js/jquery.js"></script>
    <script type="text/javascript" src="https://m.wozamai.com/huodong/ceshenjia/js/html2canvas.js"></script>
    <script src="https://m.wozamai.com/huodong/ceshenjia/js/vue.js"></script>
    <script type="text/javascript" src="https://m.wozamai.com/huodong/ceshenjia/js/remBase.js"></script>
</head>
<body>
<div id="mainBox">
    <div class="starBox">
        <div class="mainBox">
            <img class="star" src="https://m.wozamai.com/huodong/ceshenjia/images/star.png"/>
            <div class="inmain">
                <h1 class="title">宋子哲<em>抢到现金券</em><i>示例</i></h1>
                <p class="moneyNum" v-html="num"></p>
                <p class="word" v-html="word"></p>
                <p class="ewmImg">
                    <img src="/sales/qrcode_for_gh_a97cf04cd8f3_430.jpg"
                         clstag="pageclick|keycount|LA2016-2-001-001_dlrPage_20161222|activity_ceshenjia_img_qr_page">
                </p>
                <p class="ewmWord">长按识别二维码<br>查看你的未来身价</p>
            </div>
        </div>
        <div class="putName clearfix">
            <span class="fl">姓名</span>
            <input maxlength="10" v-model="tempName" v-on:input="nameChange" class="fl" type="text"
                   id="name" value="" placeholder="请输入您的姓名">
        </div>
        <a class="subBtn" href="javascript:;" @click="subbtn"
           clstag="pageclick|keycount|LA2016-2-001-001_dlrPage_20161222|activity_ceshenjia_btn_submit">确定</a>
        <p class="beizhu"><img class="logo" src="/sales/logo.png"/>解释权由文思学堂所有
        </p>
    </div>
</div>
<div class="shadow">
    <div>
        <p class="shadowWord">抢的人太多，容小的慢慢来...</p>
        <p class="scalBox"><span class="scalBar"></span><em class="scalNum">0%</em></p>
    </div>
</div>

<div class="pop">
    <div class="codeBox">
        <img src="https://m.wozamai.com/huodong/ceshenjia/images/code.jpg"
             clstag="pageclick|keycount|LA2016-2-001-001_dlrPage_20161222|activity_ceshenjia_img_qr_caifu">
        <p>长按或保存二维码，关注公众号</p>
        <a href="javascript:;" class="close" onclick="$('.pop').fadeOut(500);"></a>
    </div>
</div>
</body>
<script type="text/javascript">
    $(function () {
        var vm = new Vue({
            el: '#mainBox',
            data: {
                newName: '王思聪',
                tempName: '',
                num: '500<em>元</em>',
                word: '凭您这手气，孩子的学习肯定棒棒的！',
                time: 0
            },
            methods: {
                subbtn: function () {
                    if (this.tempName == '') {
                        alert('请输入姓名');
                        return false
                    }
                    $('.shadow').css({display: '-webkit-box'});
                    this.timeDown(this.time)
                },
                timeDown: function (time) {
                    var timer = null;
                    var _this = this;
                    var rndT = this.rnd(20, 60);
                    if (time == 100) {
                        clearTimeout(timer)
                        this.time = 0;
                        $('.shadow').fadeOut(500)
                        var name = this.tempName;
                        this.tempName = '';

                        window.location = 'endpage.html?name=' + encodeURIComponent(name);
                        return;
                    }
                    time++
                    $('.scalBar').width(time + '%');
                    $('.scalNum').html(time + '%').css({left: (time - 2 + '%')})
                    timer = setTimeout(function () {
                        _this.timeDown(time)
                    }, rndT)
                },
                rnd: function (n, m) {
                    return parseInt(Math.random() * (m - n)) + n;
                },
                nameChange: function () {
                    var name = $('#name').val();
                    wxShare.title = (name.length === 0 ? defaultTitle : name + '竟然值这么多钱，快来测测你的身价');
                    doNewWxShare(wxShare);
                }
            }
        });
    });
</script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    var _rc = window.location.href.indexOf('test') > 0 ? '/bigc' : '';

    var random_num = parseInt(2 * Math.random()) + 1;
    var _link = window.location.href.indexOf('test') > 0 ? window.location.href.split('?')[0] : 'https://m.wozamai.com/huodong/ceshenjia/index.html';
    if (random_num == 2) {
        _link = window.location.href.indexOf('test') > 0 ? window.location.href.split('?')[0] : 'https://m.wozamai.com/huodong/ceshenjia/index.html';
    }
    var defaultTitle = '原来我未来的身价值这么多，快告诉我你的身价';
    var wxShare = {
        title: defaultTitle,
        desc: '太准了！快来和好友一起PK身价吧~',
        link: _link,
        imgUrl: getDomain() + _rc + '/huodong/ceshenjia/images/wxShare.png'
    };
    doNewWxShare(wxShare);
</script>
<script src="https://m.wozamai.com/h5/js/bottom.js"></script>
<script>
    function is_weixn() {
        var ua = navigator.userAgent.toLowerCase();
        if (ua.match(/MicroMessenger/i) == "micromessenger") {
            return true;
        } else {
//            return false;
            window.location.href = ('404.html');
        }
    }

    is_weixn();
</script>
</html>